#include "TextStreamStandardIO.h"
#include <iostream>

Factory < TextStreamInterface > TextStreamStandardIO::factory;

TextStreamInterfacePtr TextStreamStandardIO::Spawn ()
{
	return factory.CreateNewObject < TextStreamStandardIO > ();
}

void TextStreamStandardIO::CheckInnocence ()
{
	assert ( factory.ObjectsCount () == 0 );
}

char TextStreamStandardIO::ReadChar ()
{
	char ch;
	std::cin >> ch;
	return ch;
}

void TextStreamStandardIO::WriteString ( std::string str )
{
	std::cout << str;
}

